import thin_render from "./thin_render.mjs";
export default function foreach_template(container, template) {
  if (typeof template.foreach === "function") {
    template.t.data = template.foreach;
    thin_render(container, template.t);
  } else if (typeof template.foreach === "string") {
    template.t.datapath = template.foreach;
    thin_render(container, template.t);
  } else if (Array.isArray(template.foreach)) {
    template.t.data = template.foreach;
    thin_render(container, template.t);
  }
}
